<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>弹性盒兼容性</title>
    <style>
        /*
        采用SASS封装弹性盒子兼容性方法

        @mixin flexbox($flex:flex){
            @if $flex == flex{
                display:flex;
                display:-webkit-flex;
                display:-webkit-box;
            }
            @else{
                display:inline-flex;
                display:-webkit-inline-flex;
                display:-webkit-inline-box;
            }
        }

        @mixin flexDirection(){
            flex-direction:row;
            -webkit-flex-direction:row;
            -webkit-box-orient:horizontal;
        }*/

        .wrapper{
            height:500px;
            display:-webkit-box;
            -webkit-box-orient:horizontal;
            -webkit-box-pack:start;
            -webkit-box-align:stretch;
        }
        .wrapper div{
            width:100px;
            height:100px;
            border:solid 1px #ff0000;
        }
        .wrapper div:nth-of-type(2){
            -webkit-box-flex:1;
        }
    </style>
</head>
<body>
    <div class="wrapper">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
    </div>
</body>
</html>
